// Fill out your copyright notice in the Description page of Project Settings.


#include "SurveillanceSubWindow.h"

#include "Components/Button.h"
#include "Components/Image.h"
#include "Components/TextBlock.h"


void USurveillanceSubWindow::NativeOnInitialized()
{
	Super::NativeOnInitialized();

	Btn_Zoom->OnClicked.AddUniqueDynamic(this, &USurveillanceSubWindow::OnZoomBtnClicked);
}

void USurveillanceSubWindow::OnZoomBtnClicked()
{
	if (bIsZoom)
		bIsZoom = false;
	else
		bIsZoom = true;
	
	Dele_OnZoomBtnClicked.ExecuteIfBound(bIsZoom, this);
}

void USurveillanceSubWindow::SetImageMaterial(UMaterialInstanceDynamic* ImgMaterial)
{
	Image_View->SetBrushFromMaterial(ImgMaterial);
}

void USurveillanceSubWindow::SetCameraName(FName Name)
{
	Text_CameraName->SetText(FText::FromName(Name));
}
